body {
    background: #172033; 
    font-family: 'Inter', sans-serif;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;

    height: 100vh;       /* toàn màn hình */
    margin: 0;           /* xóa khoảng trắng mặc định */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;    /* không cho scroll */
}

        
        .container {
            
            border-radius: 24px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
            padding: 40px;
            max-width: 1000px;
            width: 100%;
            transition: transform 0.3s ease;
        }
        
        .container:hover {
            transform: translateY(-5px);
        }
        
        .title {
            text-align: center;
            font-size: 2.5rem;
            font-weight: 800;
            color: #2d3748;
            margin-bottom: 50px;
            position: relative;
            display: inline-block;
            width: 100%;
        }
        
        .title:after {
            content: "";
            display: block;
            width: 80px;
            height: 5px;
            background: #4f46e5;
            border-radius: 10px;
            position: absolute;
            bottom: -15px;
            left: 50%;
            transform: translateX(-50%);
        }
        
        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 25px;
        }
        
        .live-tile {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 30px 20px;
            background: #F0F0F0;
             /* background: linear-gradient(to bottom right, #F6F6F6F6, #B38B59); background: rgb(246, 246, 246); 0.5,*/
            border-radius: 20px;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
            border: 2px solid transparent;
            min-height: 180px;
        }
        
        .live-tile:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(79, 70, 229, 0.2);
            background: #F0F0F0;
            border-color: #c7d2fe;
        }
        
        .live-tile:before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #4f46e5, #818cf8);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.4s ease;
        }
        
        .live-tile:hover:before {
            transform: scaleX(1);
        }
        
        .tile-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            transform-origin: center;
        }
        
        .live-tile:hover .tile-content {
            transform: scale(1.2); /*Phóng to */
        }
        
        .live-tile-icon {
            font-size: 3.5rem;
            margin-bottom: 15px;
            color: #d26739;
            transition: all 0.4s ease;
        }
        
        .live-tile-text {
            font-size: 1.4rem;
            font-weight: 700;
            color: #2d3748;
            text-align: center;
            transition: all 0.4s ease;
        }
        
        .footer {
            text-align: center;
            margin-top: 50px;
            color: #718096;
            font-size: 0.9rem;
        }
        
        .footer a {
            color: #4f46e5;
            text-decoration: none;
            font-weight: 600;
        }
        
        @media (max-width: 768px) {
            .container {
                padding: 25px;
            }
            
            .title {
                font-size: 2rem;
            }
            
            .grid {
                gap: 15px;
            }
            
            .live-tile {
                padding: 25px 15px;
                min-height: 160px;
            }
            
            .live-tile-icon {
                font-size: 3rem;
            }
            
            .live-tile-text {
                font-size: 1.2rem;
            }
        }
        h1 {
        font-size: 30px;
        font-family: 'Tahoma';
        font-weight: 800;
        letter-spacing: auto;
        margin: 65px auto;
        background: linear-gradient(90deg, rgb(246, 244, 244), rgb(252, 251, 248), rgb(252, 252, 254));
        background-size: 400%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: gradientShift 5s linear infinite;
        }

    @keyframes gradientShift {
      0% {
        background-position: 20% 50%;
      }
      100% {
        background-position: 90% 40%;
      }
    }
	@media (max-width: 1080px) {
  .grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 768px) {
  body {
    overflow-y: auto !important;
  }
}
@media (max-width: 768px) {
  /* Cho phép body co giãn theo nội dung, không ép full màn hình */
  body {
    height: auto !important;
    overflow-y: auto !important;
    padding: 10px !important;
  }

  /* Giảm kích thước tiêu đề */
  .title {
    font-size: 1.5rem !important;
    margin: 20px 0 !important;
  }

  /* Giảm cỡ chữ cho phần bên trong tiêu đề */
  .title span {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
    word-wrap: break-word;
    text-align: center;
  }
}
/* ========== CẢI THIỆN GIAO DIỆN PHẦN THỜI TIẾT ========== */
@media (max-width: 768px) {
  /* Giảm kích thước và khoảng cách tiêu đề */
  h2.text-lg {
    font-size: 1.1rem !important;
    margin-bottom: 0.75rem !important;
  }

  /* Ô tìm kiếm nhỏ gọn hơn */
  #cityInput {
    width: 70% !important;
    font-size: 0.75rem !important;
    padding: 0.3rem !important;
  }

  #searchButton {
    font-size: 0.75rem !important;
    padding: 0.3rem 0.6rem !important;
  }

  /* Các ô độ ẩm / gió nhỏ lại và đều nhau */
  #weatherContainer .grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  #weatherContainer .bg-gray-100 {
    padding: 0.4rem !important;
  }

  #weatherContainer p {
    font-size: 0.75rem !important;
  }

  /* Ô dự báo 7 ngày: hiển thị 2–3 ô mỗi hàng */
  #forecastGrid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
    gap: 0.5rem !important;
  }

  #forecastGrid div {
    padding: 0.4rem !important;
    border-radius: 10px !important;
  }

  /* Nút AI nhỏ lại */
  #aiButton {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.5rem !important;
  }

  #aiContainer {
    padding: 0.4rem !important;
  }

  /* Nhiệt độ hiển thị vừa hơn */
  #temperature {
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
  }
}

